if exists(select name from sysobjects where name = 'sp_YouTubeGetAllByTrangThai')
	drop proc sp_YouTubeGetAllByTrangThai
go
/*-- =============================================
	Created by: HP
	Created on: 2014-04-22 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_YouTubeGetAllByTrangThai.sql
*/-- =============================================

CREATE PROCEDURE sp_YouTubeGetAllByTrangThai
    @TrangThai int
AS
BEGIN
	select top 4
		a.[YouTubeId],
		a.[Name],
		a.[Images],
		a.[Icon],
		a.[Link],
		a.[ThuTu],
		a.[TrangThai],
		a.[NgayTao]
    
	FROM
        YouTube a WHERE TrangThai=@TrangThai
    
END
GO
